<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate98 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('box_records', function (Blueprint $table) {
            
            $table->integer('node_id')->index()->comment('盲盒id');
            $table->integer('room_id')->index()->comment('房间id');
            $table->json('user')->nullable()->comment('用户信息');
            $table->json('sku')->nullable()->comment('盒子');
            $table->integer('level')->default(1)->index()->comment('物品等级');
            $table->integer('total')->default(1)->comment('物品数量');
            $table->integer('open_index')->nullable()->comment('开盒序号');
        });

        Schema::table('box_skus', function (Blueprint $table) {
            
            $table->integer('level')->default(1)->index()->comment('物品等级');
            
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
